package org.ruanjj.designmodel.singletonmodel;

//单例模式
public class Singleton {
    private static Singleton singleton = new Singleton();

    public static Singleton getInstance(){
        return singleton;
    }

    private Singleton(){
        System.out.println("该方法限制该对象被创建，保证单例的特性");
    }
}
